Version

ResetSelection(SpreadsheetCellRange[],SpreadsheetCell,Int32,Boolean) Method

Clears the current selection and uses the specified information to reinitialize the selection.
Syntax
'Declaration
 
Public Overloads Function ResetSelection( _
   ByVal ranges() As SpreadsheetCellRange, _
   ByVal activeCell As SpreadsheetCell, _
   ByVal newActiveRangeIndex As Integer, _
   Optional ByVal extendRangeForMergedCells As Boolean _
) As Boolean

Parameters

ranges
The new selection ranges. There must be 1 or more ranges.
activeCell
The cell to use for the ActiveCell. This must be within the specified ranges.
newActiveRangeIndex
The index of the range that contains the active cell.
extendRangeForMergedCells
True to adjust the ranges such that it contains any intersecting merged cells; otherwise false to use the range as it is.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionThe ranges cannot be null.
System.ArgumentExceptionThe ranges cannot be a 0 length array.
System.ArgumentOutOfRangeExceptionThe newActiveRangeIndex must be an index within the specified ranges.
System.ArgumentExceptionThe activeCell must be within the range index specified by the newActiveRangeIndex.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also